<!--我的部分-->
<template>
  <div class="person_wrapper">
    <div class="top">
      <span>客服</span>
      <span @click="$router.push('/set')">设置</span>
    </div>
    <div class="user">
      <div class="user_left">
        <img src="../assets/head2.jpg" alt />
        <div class="user_info">
          <p>
            <span>Tamako</span>
            <span class="auth">实名认证</span>
          </p>
          <div class="user_data">
            <span>关注 0</span>
            <span>评价 4</span>
            <span>勋章 32</span>
          </div>
        </div>
      </div>
      <div class="user_right">
        个人主页
        <van-icon name="arrow" />
      </div>
    </div>
    <div class="card_1">
      <div class="card_1_top">
        <div class="card_1_top_item">
          美团币20个
          <van-icon name="arrow" />
        </div>
        <div class="card_1_top_item">
          余额 57.36元
          <van-icon name="arrow" />
        </div>
      </div>
      <div class="card_1_list">
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/cart.jpg')" />
          </div>
          <span>购物车</span>
        </div>
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/shoucang.jpg')" />
          </div>
          <span>收藏</span>
        </div>
        <div class="card_1_item">
        <div class="card_1_item_image">
          <van-image width="40" height="40" radius="2" :src="require('../assets/zuji.jpg')" />
          </div>
          <span>浏览记录</span>
        </div>
        <div class="card_1_item">
        <div class="card_1_item_image">
          <van-image width="40" height="40" radius="2" :src="require('../assets/kabao.jpg')" />
          </div>
          <span>红包卡券</span>
        </div>
      </div>
    </div>
    <div class="card_2">
      <div class="card_2_header">
        <span>订单</span>
        <span>
          全部
          <van-icon name="arrow" />
        </span>
      </div>
      <div class="card_1_list">
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/dingdan.jpg')" />
          </div>
          <span>全部订单</span>
        </div>
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/daishiyong.jpg')" />
          </div>
          <span>待收款/使用</span>
        </div>
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/pingjia.jpg')" />
          </div>
          <span>待评价</span>
        </div>
        <div class="card_1_item">
          <div class="card_1_item_image">
            <van-image width="40" height="40" radius="2" :src="require('../assets/tuikuan.jpg')" />
          </div>
          <span>退款售后</span>
        </div>
      </div>
    </div>
    <div class="card_2">
      <div class="card_2_header">
        <span>钱包</span>
        <span>
          全部
          <van-icon name="arrow" />
        </span>
      </div>
      <div class="card_1_list tesu">
        <div class="card_1_item">
          <span>4000</span>
          <span>90天0利息</span>
          <span>美团借钱</span>
        </div>
        <div class="card_1_item">
          <span>1笔</span>
          <span>先用后还</span>
          <span>我的额度</span>
        </div>
        <div class="card_1_item">
          <span>90000</span>
          <span>查看卡额度</span>
          <span>可免息消费</span>
        </div>
        <div class="card_1_item">
          <span>1笔</span>
          <span>未领取</span>
          <span>支付补贴</span>
        </div>
      </div>
    </div>
    <div class="banner">
      <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
        <van-swipe-item>
          <div class=" banner_list">
            <div class="item" v-for="(item, index) in bannerList" :key="index">
              <div class="item_image">
              </div>
              <span>{{item.name}}</span>
            </div>
          </div>
        </van-swipe-item>
      </van-swipe>
    </div>
    <div class="book">
      <div class="book_header">
        <span>书城</span>
        <span style="color:#ccc;font-size:14px;">
          赚金币，可提现
          <van-icon name="arrow" />
        </span>
      </div>
      <div class="book_content">
        <div class="book_left">
          <van-image width="50" height="50" radius="2" :src="require('../assets/zhenhuan.jpg')" />
          <div class="book_info">
            <span>甄嬛传</span>
            <span>赚钱阅读 可提现</span>
          </div>
        </div>
        <div class="book_right">开始阅读</div>
      </div>
    </div>
    <div class="list">
      <div class="item" v-for="(item, index) in iconlist" :key="index">
        <div class="item_image">
        </div>
        <span>{{item.name}}</span>
      </div>
    </div>
  </div>
</template>
  
<script>
export default {
  data() {
    return {
      bannerList: [
        {
          name: '小美餐厅'
        },
        {
          name: '天天领现金'
        },
          {
            name:'小美果园'
          },
          {
            name:'斗地主'
          },
          {
            name:'全民种红包'
          },
          {
            name:'鲜果消消'
          },
          {
            name:'团团赚'
          },
          {
            name:'美食小镇'
          },
      ],
      iconlist: [
        {
          name:'小美音频'
        },
        {
          name:'推现金'
        },
        {
          name:'企业服务'
        },
        {
          name:'开发票'
        },
        {
          name:'手机充值'
        },
        {
          name:'入驻美团'
        },
        {
          name:'美团公益'
        },
        {
          name:'全部工具'
        }
      ]
    }
  },
};
</script>
  
<style lang="scss" scoped>
.person_wrapper {
  background-color: #f5f5f5;
  min-height: 100vh;
  padding: 0 10px 10px;
}
.top {
  text-align: right;
  padding: 10px 0;
  span {
    margin-left: 8px;
  }
}
.user {
  display: flex;
  align-items: center;
  justify-content: space-between;
  .user_left {
    display: flex;
    align-items: center;
    img {
      width: 40px;
      height: 40px;
      margin-right: 8px;
      border-radius: 50%;
    }
    .auth {
      font-size: 12px;
      margin-left: 16px;
      background: #19181807;
      padding: 4px;
      border-radius: 20px;
    }
    .user_data {
      font-size: 12px;
      margin-top: 4px;
    }
  }
  .user_right{
    background: #19181807;
    font-size: 14px;
    padding: 4px;
    border-radius: 16px;
  }
}
.card_1 {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin: 20px 0 10px;
  font-size: 14px;

  .card_1_top {
    display: flex;
    .card_1_top_item {
      flex: 1;
      text-align: center;
    
    }
  }

  .card_1_list {
    display: flex;
    margin-top: 10px;
    .card_1_item {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      flex: 1;
      .card_1_item_image{
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-top: 4px;
        // margin-bottom: 6px;
        background-position: 0 0;
        background-size: 120px;
        span{
          font-size: 28px;
        }
      }
      img {
        width: 40px;
        height: 40px;
        margin-top: 4px;
        margin-bottom: 6px;
      }
    }
  }
}

.card_2 {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  font-size: 14px;
  .card_2_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .card_1_list {
    display: flex;
    margin-top: 10px;
    .card_1_item {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      flex: 1;
      span {
      }
      .card_1_item_image{
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        margin-top: 4px;
        background-position: 0 0;
        background-size: 120px;
        span{
          font-size: 28px !important;
        }
      }
      img {
        width: 40px;
        height: 40px;
        margin-top: 4px;
      }
    }
  }
}
.banner {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 10px;
}
.book {
  background: #fff;
  padding: 10px;
  border-radius: 8px;
  .book_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .book_content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    .book_left {
      display: flex;
      .book_info {
        display: flex;
        flex-direction: column;
      }
      img {
        width: 50px;
        height: 70px;
        margin-right: 6px;
        border-radius: 4px;
      }
    }
    .book_right {
      border: 1px solid #ccc;
      border-radius: 20px;
      padding: 4px;
      font-size: 12px;
    }
  }
}
.list {
  margin-top: 10px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 10px;
  border-radius: 8px;
  font-size: 14px;
  .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 25%;
    margin-bottom: 10px;
    .item_image {
      width: 40px;
      height: 40px;
      background: url('../assets/icons.png') no-repeat 0 4px;
      background-size: 364px;
    }
    &:nth-child(2){
      .item_image{
        background-position: -108px 4px;
      }
    }
    &:nth-child(3){
      .item_image{
        background-position: -218px 4px;
      }
    }
    &:nth-child(4){
      .item_image{
        background-position: -324px 4px;
      }
    }

    &:nth-child(5){
      .item_image {
        background-position: 0 -78px;
      }
    }
    &:nth-child(6){
      .item_image{
        background-position: -108px -78px;
      }
    }
    &:nth-child(7){
      .item_image{
        background-position:  -218px -78px;
      }
    }
    &:nth-child(8){
      .item_image{
        background-position: -324px -78px;
      }
    }
  }
}
.banner_list {
  margin-top: 10px;
  background: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 10px;
  border-radius: 8px;
  font-size: 14px;
  .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 25%;
    margin-bottom: 10px;
    .item_image {
      width: 40px;
      height: 40px;
      background: url('../assets/ad.png') no-repeat 0 -4px;
      background-size: 364px;
    }
    &:nth-child(2){
      .item_image{
        background-position: -108px -3;
      }

    }
    &:nth-child(3){
      .item_image{
        background-position: -218px -4px;
      }

    }
    &:nth-child(4){
      .item_image{
        background-position: -324px -4px;
      }
    }
    &:nth-child(5){
      .item_image{
        background-position: 0 -85px;
      }
    }
    &:nth-child(6){
      .item_image{
        background-position: -108px -85px;
      }
    }
    &:nth-child(7){
      .item_image{
        background-position:  -218px -85px;
      }
    }
    &:nth-child(8){
      .item_image{
        background-position: -324px -85px;
      }
    }
  }
}
.tesu{
  .card_1_item{
    span{
      &:first-child{
        font-weight: 700;
      }
      &:last-child{
        color: #aa9a9a;
        font-size: 12px;
      }
    }
  }
}
</style>